<?php 
      echo $this->Html->css("chosen");
      echo $this->Html->css("dataTables");
      echo $this->Html->css("validationEngine.jquery");
 ?>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/customInput.jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/chosen.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/zice.custom1.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/ColVis.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/accounting.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/jquery.validationEngine.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/jquery.validationEngine-vi.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/jquery.autotab.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/layout_table.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/delivery_manager.js"></script>

<div class="titlePage">
<h1>Quản lý giao hàng</h1>
</div>

<div class="onecolumn">
	<div class="header">
	<span>
		<span class="ico gray spreadsheet"></span>
		DANH SÁCH HÓA ĐƠN
	</span>
	</div>
	<div class="clear"></div>
	<div class="content">
        <form>
                            		<div class="tableName">
										<table class="display data_table2 listWhInvoiceTransfer" >
											<thead>
												<tr>
													<th><div class="th_wrapp">Khách hàng</div></th>
													<th><div class="th_wrapp">Địa chỉ</div></th>
													<th><div class="th_wrapp">Điện thoại</div></th>
													<th><div class="th_wrapp">Tổng tiền</div></th>
													<th><div class="th_wrapp">Ngày mua</div></th>
													<th><div class="th_wrapp">Ghi chú</div></th>
												</tr>
											</thead>
											<tbody>
											<?php 
											foreach ($list_wh_delivery as $item) {
										?>
												<tr class="odd gradeX InvoiceID" id="<?php  echo $item['wh']['id']; ?>" >
							      					<td class="WhInvoice" ><?php  echo $item['c']['name'];?></td>
							      					<td><?php  echo $item['c']['address'];?></td>
							      					<td><?php  echo $item['c']['phone'];?></td>
							      					<td class='formatMoney'><?php  echo $item['wh']['total']; ?></td>
							      					<td><?php  echo date('d/m/Y H:i',strtotime($item['wh']['date']));?></td>
							      					<td><textarea cols="15" class="note" rows="2" id="<?php  echo $item['wh']['id']; ?>_note"></textarea></td>
							      					</tr><?php }?>
						     					
										</tbody>
									</table>
					            </div>
							</form>
         </div>
         <div class="clear"/></div>  
</div>
<div class="onecolumn">
	<div class="header">
		<span>
			<span class="ico gray arrow_bidirectional"></span>
			DANH SÁCH HÓA ĐƠN GIAO
		</span>
	</div>
	<div class="clear"></div>
	<div class="content">
		<form id="validation">
			<div class="tableName" >
				<table class="display data_table2 listInvoiceTransfer" >
					<thead>
						<tr>
							<th><div class="th_wrapp">Khách hàng</div></th>
							<th><div class="th_wrapp">Địa chỉ</div></th>
							<th><div class="th_wrapp">Điện thoại</div></th>
							<th><div class="th_wrapp">Tổng tiền</div></th>
							<th><div class="th_wrapp">Ngày mua</div></th>
							<th><div class="th_wrapp">Ghi chú</div></th>
						</tr>
					</thead>
					<tbody>
	     					
					</tbody>
				</table>
            </div>
			<div class="section" style="float:left; margin-right: 10%;border-bottom: none;">
				<label>
				Chọn Xe:				
				</label>
				<br>
				<div id="search_car" >
					<select class="choose_car">
                          <?php foreach ($list_car as $item) {?>
							<option value="<?php echo $item['c']['id']; ?>"><?php echo $item['c']['number'];}?></option>
                     </select>
					
				</div>
			</div>
			<div class="section" style="float:left;margin-right: 10%;border-bottom: none;">
				<label>
				Chọn tài xế:				
				</label>
				<div id="search_driver" >
					<select class="choose_driver">
                          <?php foreach ($list_driver as $item) {?>
							<option value="<?php echo $item['e']['id']; ?>"><?php echo $item['e']['name'];}?></option>
                     </select>
					
				</div>
			</div>
			<div class="section " style="float:left;border-bottom: none;">
				<label>
				Chọn Lơ xe:				
				</label>
				<br>
				<div id="search_transfomer1" >
					<select class="choose_transfomer1">
                          <?php foreach ($list_transfomer as $item) {?>
							<option value="<?php echo $item['e']['id']; ?>"><?php echo $item['e']['name'];}?></option>
                     </select>
				</div>
				<div id="search_transfomer2" >
					<select class="choose_transfomer2">
                          <?php foreach ($list_transfomer as $item) {?>
							<option value="<?php echo $item['e']['id']; ?>"><?php echo $item['e']['name'];}?></option>
                     </select>
               </div>
			</div>
		</form>
		<div class="buttonNewListInvoiceDelivery">
			<a class="uibutton" id='create_delivery_invoice'><span class="ico gray checkmark2"></span>Giao hàng</a>
			<div id='alert_mes'></div>
		</div>
	</div>
</div>
